#ifndef BMACHINECONTROL_H
#define BMACHINECONTROL_H


#include <QString>
#include <QAxObject>
#include <QDebug>
#include <QUuid>
#include <QNetworkInterface>
#include <QCryptographicHash>
#include <QDateTime>
#include <QSettings>
#include <QFile>
#include <QFileInfo>
#include <QDir>
#include <QDataStream>
#include <QList>
#include <Windows.h>

class BMachineControl: public QObject
{
public:
    struct Settings {
        QString test_first_time;
        QString test_lastuse_time;
        QString test_time_out;
        bool isReged;
    };
    explicit BMachineControl(QObject *parent = nullptr);
    Settings currentSettings;
    QString getHostMacAddress();
    // 根据设备信息、日期、可使用月份生成key
    QString getCrypKey(QString machineinfo); //临时一个月使用权限
    QString getCrypKey1(QString machineinfo); //永久注册
    void writeRegVal(QString key,QString value);
    QString writeTempRegVal(); //注册一个月使用权限
    void getRegVal();
    QString getCpuId();

    QString dateEnCryp(QString str);
    QString dateDeCryp(QString str);
    QString toUpperAndLower(QString src);
private:

};

#endif // BMACHINECONTROL_H
